package javabase.schoolwork.day5_24;

/**
 * @author fance
 * @date 2018/5/24 19:53
 */
public class Student {
    private int num;
    private String name;
    private double mathScore;
    private double englishScore;
    private double computerScore;

    public Student(int num, String name, double mathScore, double englishScore, double computerScore) {
        this.num = num;
        this.name = name;
        this.mathScore = mathScore;
        this.englishScore = englishScore;
        this.computerScore = computerScore;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getMathScore() {
        return mathScore;
    }

    public void setMathScore(double mathScore) {
        this.mathScore = mathScore;
    }

    public double getEnglishScore() {
        return englishScore;
    }

    public void setEnglishScore(double englishScore) {
        this.englishScore = englishScore;
    }

    public double getComputerScore() {
        return computerScore;
    }

    public void setComputerScore(double computerScore) {
        this.computerScore = computerScore;
    }

    public double getSumScore() {
        return mathScore + englishScore + computerScore;
    }
    public double getAvgScore() {
        return (mathScore + englishScore + computerScore) / 3;
    }

    public double MaxScore() {
        return Math.max(mathScore,Math.max(englishScore,computerScore));
    }
    public double MinScore() {
        return Math.min(mathScore,Math.min(englishScore,computerScore));
    }
}
